package jbox2dprocessing.compontent;

import processing.core.PApplet;
import processing.core.PConstants;

public class HelperShape {
	public static PApplet parent;
	
	public float helperStartX;
	public float helperStartY;
	public float helperEndX;
	public float helperEndY;
	
	public int helperColor;
	public int helperStrokeColor;
	public int helperStrokeWeight;
	
	public HelperShape() {
		super();
		this.helperStartX = 0;
		this.helperStartY = 0;
		this.helperEndX = 0;
		this.helperEndY = 0;
		this.helperColor = parent.color(111);
		this.helperStrokeColor = parent.color(255,0,0);
		this.helperStrokeWeight = 2;

	}

	public HelperShape(float helperStartX, float helperStartY, float helperEndX,
			float helperEndY) {
		super();
		this.helperStartX = helperStartX;
		this.helperStartY = helperStartY;
		this.helperEndX = helperEndX;
		this.helperEndY = helperEndY;
		this.helperColor = parent.color(111);
		this.helperStrokeColor = parent.color(113,113,0);
		this.helperStrokeWeight = 2;
	}
	
	public void updateHelper(){
		parent.rectMode(PConstants.CORNERS);
		parent.fill(helperColor);
		parent.stroke(helperStrokeColor);
		parent.strokeWeight(helperStrokeWeight);
		parent.rect(helperStartX, helperStartY, helperEndX, helperEndY);
	}
	
	public void hideHelper(){
		helperStartX = -100;
		helperStartY = -100;
		helperEndX = -100;
		helperEndY = -100;

	}
}
